/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Jhon
 */
@Embeddable
public class AccountPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idAccount", nullable = false)
    private int idAccount;
    @Basic(optional = false)
    @Column(name = "User_idUser", nullable = false)
    private int useridUser;

    public AccountPK() {
    }

    public AccountPK(int idAccount, int useridUser) {
        this.idAccount = idAccount;
        this.useridUser = useridUser;
    }

    public int getIdAccount() {
        return idAccount;
    }

    public void setIdAccount(int idAccount) {
        this.idAccount = idAccount;
    }

    public int getUseridUser() {
        return useridUser;
    }

    public void setUseridUser(int useridUser) {
        this.useridUser = useridUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idAccount;
        hash += (int) useridUser;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AccountPK)) {
            return false;
        }
        AccountPK other = (AccountPK) object;
        if (this.idAccount != other.idAccount) {
            return false;
        }
        if (this.useridUser != other.useridUser) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.AccountPK[idAccount=" + idAccount + ", useridUser=" + useridUser + "]";
    }

}
